package com.daxia.ogmall.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * TimelineLike
 */
@Entity
@Table(name = "timelinelike") 
public class TimelineLike extends BaseModel {
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 动态
	 */
	@ManyToOne
	@JoinColumn(name = "timeline_id")
    private Timeline timeline;
	/**
	 * 点赞用户
	 */
	@ManyToOne
	@JoinColumn(name = "user_id")
    private User user;
	/**
	 * 时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")	
	@Column(name = "time")
    private Date time;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public Timeline getTimeline() {
    	return timeline;
    }
	
    public void setTimeline(Timeline timeline) {
    	this.timeline = timeline;
    }
	
	public User getUser() {
    	return user;
    }
	
    public void setUser(User user) {
    	this.user = user;
    }
	
	public Date getTime() {
    	return time;
    }
	
    public void setTime(Date time) {
    	this.time = time;
    }
	
}
